home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / c / tools / coolwork / mcoolgen.sc_ / mcoolgen.sc
Encoding:
Text File  |  1994-02-19  |  19.0 KB  |  732 lines

  1. $! Coolgen Script V1.0 2/16/94
  2. $! Microsoft version
  3.  
  4. $I100000000 200000000
  5. $F$F.C
  6. /******************************************************************
  7. $I100000000
  8.     $F - MDI CoolWorx program created by CoolGen
  9. $E
  10.     $F - SDI CoolWorx program created by CoolGen
  11. $|
  12.     Date: $D
  13.  ******************************************************************/
  14. #include <windows.h>
  15. #include "$F.h"
  16. #include <cw.h>
  17.  
  18. /* Forward reference */
  19. long WINAPI _export win_proc(HWND hWnd, UINT message,
  20.          UINT wParam, LONG lParam);
  21. int init(HANDLE,HANDLE,int);
  22.  
  23.  
  24. $I100000000
  25. #define WINDOWMENU 4
  26. $|
  27. HANDLE hInst;
  28. HWND mainw;
  29. char ini[]="$F.ini";
  30.  
  31. /* Main entry point */
  32. int PASCAL WinMain(HANDLE hInstance, HANDLE prev,
  33.               LPSTR cmdline, int show)
  34.   {
  35.   HANDLE acc=NULL;
  36.   hInst=hInstance;
  37.   cw_BeginIcons(hInst,LoadIcon(hInst,MAKEINTRESOURCE(APPICON)),
  38. $I100000000
  39.       LoadIcon(hInst,MAKEINTRESOURCE(DOCICON))
  40. $E
  41.        NULL
  42. $|
  43.       ,NULL);
  44.   if (!init(hInst,prev,show)) return FALSE;
  45.   /* Vanilla event loop */
  46. $I200000000
  47.   acc=LoadAccelerators(hInst,MAKEINTRESOURCE(EMENU));
  48.   cw_Run(mainw,NULL,1,&acc,
  49. $E
  50.   cw_Run(mainw,cw_MDIGetClientWindow(mainw),1,&acc,
  51. $|
  52. $I0000000X0
  53.   TRUE,
  54. $E
  55.   FALSE,
  56. $|
  57. $I00000000X
  58.   TRUE
  59. $E
  60.   FALSE
  61. $|
  62.   );
  63.   cw_End(hInst);
  64.   return FALSE;
  65.   }
  66.  
  67. /* Create window here */
  68. int init(HANDLE hInstance, HANDLE prev,int nCmdShow)
  69.          {
  70.          HWND            hWnd;
  71.          /* Create a main window */
  72. $I100000000
  73.          mainw=hWnd=cw_MDICreateFrame("$F","MMENU",0,
  74.            hInstance,(FARPROC)win_proc,FALSE,2000,
  75. $I010000000
  76.            MAKEINTRESOURCE(MENUBAR),NULL,NULL,
  77. $|
  78. $I020000000
  79.            NULL,MAKEINTRESOURCE(MENUBAR),NULL,
  80. $|
  81. $I030000000
  82.            NULL,NULL,MAKEINTRESOURCE(MENUBAR),
  83. $|
  84. $I001000000
  85.            MAKEINTRESOURCE(STATUS_BAR),
  86. $E
  87.            NULL
  88. $|
  89.            LoadAccelerators(hInst,"MMENU"),
  90. $I010000000
  91.            CWRIBBON_TOP
  92. $|
  93. $I020000000
  94.            CWRIBBON_LEFT
  95. $|
  96. $I030000000
  97.            CWRIBBON_RIGHT
  98. $|
  99. $I040000000
  100.            0
  101. $|
  102.  
  103.            ,0);
  104. $E
  105.          mainw=hWnd=cw_SDICreate("$F",
  106.            MAKEINTRESOURCE(EMENU),
  107.            hInst,(FARPROC)win_proc,
  108. $I010000000
  109.            MAKEINTRESOURCE(MENUBAR),NULL,NULL,
  110. $|
  111. $I020000000
  112.            NULL,MAKEINTRESOURCE(MENUBAR),NULL,
  113. $|
  114. $I030000000
  115.            NULL,NULL,MAKEINTRESOURCE(MENUBAR),
  116. $|
  117. $I040000000
  118.            NULL,NULL,NULL,
  119. $|
  120. $I001000000
  121.            MAKEINTRESOURCE(STATUS_BAR)
  122. $E
  123.            NULL
  124. $|
  125.  
  126.            ,0);
  127.  
  128. $|
  129.          if (!hWnd)
  130.            return FALSE;
  131.  
  132. $I000X00000
  133. /* Make the window visible, update its client area,
  134.           and return "success"
  135.    if we should show normal, use stored window position */
  136.          if (nCmdShow==SW_SHOWNORMAL)
  137.            cw_IniPosSet(ini,"Main",hWnd);
  138.          else
  139. $|
  140.            ShowWindow(hWnd,nCmdShow);
  141.          UpdateWindow(hWnd);
  142.          return TRUE;
  143.          }
  144.  
  145. $I100000000
  146. /* Create new (empty) child window */
  147. void new_child(HWND hWnd)
  148.   {
  149.   static int untitled=0; // keep track of #
  150.   char title[66];
  151.   wsprintf(title,"Untitled - %d",++untitled);
  152. /*! Substitute your class here */
  153.   cw_MDICreateChild("$FCLASS",title,
  154. /*! Use your styles here */
  155.     0,
  156.     CW_USEDEFAULT,0,CW_USEDEFAULT,0,
  157.     "ChildMENU",hWnd,hInst,WINDOWMENU,
  158.     LoadAccelerators(hInst,"ChildMENU"),
  159.     MAKEINTRESOURCE(EMENUBAR),
  160. $I010000000
  161.            CWRIBBON_TOP
  162. $|
  163. $I020000000
  164.            CWRIBBON_LEFT
  165. $|
  166. $I030000000
  167.            CWRIBBON_RIGHT
  168. $|
  169. $I040000000
  170.            0
  171. $|
  172.     ,NULL);
  173.   }
  174. $|
  175.  
  176. /* Window procedure */
  177. long WINAPI _export win_proc(HWND hWnd, UINT message,
  178.          UINT wParam, LONG lParam)
  179.          {
  180.          switch (message)
  181.                   {
  182.                   case WM_INITMENU:
  183. $I0000X0000
  184. /* Set up most recently opened menu
  185.    -- if child active, put at location 6 of menu 0 (file)
  186.    -- if no child windows, put at location 2 of menu 0 */
  187.                     cw_IniOpenMenu(ini,
  188.                       GetMenu(hWnd),0,
  189. $I100000000
  190.                       cw_MDIGetActive(hWnd)?6:2,4000);
  191.  
  192. $E
  193.                       6,4000);
  194. $|
  195. $|
  196. $I100000000
  197. /* Send WM_INITMENU to child window (if any) */
  198.                     cw_MDISendActive(hWnd,WM_INITMENU,wParam,
  199.                       lParam);
  200.                     break;
  201.  
  202. #if 0 // enable to have an inital window
  203.                   case CW_MDICREATE:
  204.                     new_child(hWnd);
  205.                     break;
  206. #endif
  207. $E
  208.                      break;
  209. $|
  210.  
  211. $I00100000X
  212. /* Handle help window messages */
  213.                   case CW_HELPID:
  214.                     {
  215.                     static HWND sb;
  216.                     static int oldid;
  217. /* If first time, find status bar and quit */
  218.                     if (!sb)
  219.                       {
  220.                       sb=cw_GetRibbon(hWnd,CWRIBBON_BOTTOM);
  221. /* Skip the first one so (c) message appears */
  222.                       return 0;
  223.                       }
  224. /* Filter out redundant help messages */
  225.                     if (oldid==wParam) return 0;
  226.                     oldid=wParam;
  227. /* Load help from resource file or defaults */
  228.                     cw_StatusHelp(hInst,sb,STATUS_PANE,oldid);
  229.                     break;
  230.                     }
  231. $|
  232.  
  233. $I0000000X0
  234. /* Update status bar/toolbar, etc */
  235.                   case CW_IDLE:
  236.                     {
  237.                     static unsigned divide=0;
  238. $I100000000
  239.                     HWND w=cw_MDIGetActive(hWnd);
  240. $|
  241. $I001000000
  242. /* Only update time every 600 ticks */
  243.                     if (divide++%600==0)
  244.                       cw_StatusTime(hWnd,CWRIBBON_BOTTOM,
  245.                         TIME_PANE);
  246. /* Update status keys */
  247.                     cw_StatusKeys(hWnd,CWRIBBON_BOTTOM,
  248.                       CAP_STATIC,NUM_STATIC,NULL,NULL);
  249. $|
  250. $I110000000 120000000 130000000
  251. /* Give child a chance to init toolbar and show status */
  252.                     if (w)
  253.                       SendMessage(w,CW_INITTOOL,0,(DWORD)hWnd);
  254. $|
  255.                     break;
  256.                     }
  257. $|
  258.  
  259. /* Menu commands */
  260.                   case WM_COMMAND:
  261. $I0000X0000
  262. /* Check for most recently used files */
  263.                     if (wParam>=4000&&wParam<=4010)
  264.                       {
  265.                       char fn[66];
  266.                       cw_IniOpenGet(ini,4000,
  267.                       wParam,fn,sizeof(fn));
  268.                       if (*fn)
  269.                         {
  270. /*! Open file here */
  271. /* If successful open, call cw_IniOpenSet() */
  272.                         cw_IniOpenSet(ini,fn);
  273.                         }
  274.                       break;
  275.                       }
  276. $|
  277. $I100000000
  278. /* Ask child if it can handle this message */
  279.                     if (!cw_MDISendActive(
  280.                       hWnd,CW_STDMENU,wParam,0))
  281. /* If not, we must do it.... */
  282. $|
  283.                     switch (wParam)
  284.                       {
  285. /* Create new child */
  286.                       case CM_FILENEW:
  287. $I100000000
  288.                         new_child(hWnd);
  289. $E
  290. /*! Do new file processing here */
  291. $|
  292.                         break;
  293.  
  294. /* Open file */
  295.                       case CM_FILEOPEN:
  296.                         {
  297.                         char fn[66];
  298.                         fn[0]='\0';
  299. /*! Open file here */
  300. $I0000X0000
  301. /* Register file name with most recently opened */
  302.                           cw_IniOpenSet(ini,fn);
  303. $|
  304.                          }
  305.                         break;
  306.  
  307.                        case CM_HELPABOUT:
  308. /* Use CoolDialog for about box -- no callback is needed
  309.    and there isn't any data to transfer */
  310.                        cw_DialogBox(hInst,"ABTBOX",
  311.                          mainw,NULL,cw_NullCDlgTemp());
  312.                         break;
  313.  
  314.                        }
  315.                       break;
  316.  
  317.  
  318.                   case WM_DESTROY:
  319. $I000X00000
  320. /* On exit, save window position */
  321.                     cw_IniPosSave(ini,"Main",hWnd);
  322. $|
  323.                     PostQuitMessage(0);
  324.                     break;
  325.  
  326.  
  327.                   }
  328. /* Use CoolWorx default -- not windows! */
  329. $I100000000
  330.               return (cw_DefFrameProc(hWnd, message,
  331.                          wParam, lParam));
  332. $E
  333.               return (cw_DefWindowProc(hWnd, message,
  334.                          wParam, lParam));
  335. $|
  336.          }
  337.  
  338. $F$F.H
  339. /* Header for $F Generated by CoolGen   $D */
  340. $I100000000
  341. #define DOCICON        556
  342. $|
  343. #define APPICON 555
  344. #define EMENU 556
  345. $I010000000 020000000 030000000
  346. #define EMENUBAR        125
  347. #define MENUBAR 122
  348. $|
  349. $I001000000
  350. #define STATUS_BAR      121
  351. #define STATUS_PANE     100
  352. #define NUM_STATIC      150
  353. #define CAP_STATIC      151
  354. #define TIME_PANE       101
  355. $|
  356. $F$F.RC
  357. /* Resources for $F generated by CoolGen   $D */
  358. #include <windows.h>
  359. #include <cw.h>
  360. #include <cbutton.h>
  361. #include "$F.h"
  362.  
  363. $I001000000
  364. /* Status bar */
  365. STATUS_BAR DIALOG 13, 145, 370, 20
  366. STYLE WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS
  367. CLASS "RibbonClass"
  368. FONT 8, "MS Sans Serif"
  369. {
  370.  CONTROL "", -1, "static", SS_BLACKFRAME | WS_CHILD |
  371.    WS_VISIBLE, 4, 4, 212, 12
  372.  CONTROL "", -1, "static", SS_BLACKFRAME | WS_CHILD |
  373.    WS_VISIBLE, 217, 4, 38, 12
  374.  LTEXT "$F \xA9$Y by you know who.",
  375.    STATUS_PANE, 8, 7, 207, 8
  376.  LTEXT "", TIME_PANE, 218, 6, 32, 8
  377.  CONTROL "", -1, "static", SS_BLACKFRAME | WS_CHILD |
  378.    WS_VISIBLE, 256, 4, 48, 12
  379.  LTEXT "NUM", NUM_STATIC, 312, 2, 18, 8, SS_NOPREFIX |
  380.    WS_DISABLED | WS_GROUP
  381.  LTEXT "CAP", CAP_STATIC, 335, 2, 15, 8, WS_DISABLED | WS_GROUP
  382. }
  383. $|
  384.  
  385. $I010000000
  386. /* No document menu bar */
  387. MENUBAR DIALOG 17, 106, 385, 20
  388. STYLE WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS
  389. CLASS "RibbonClass"
  390. FONT 8, "MS Sans Serif"
  391. {
  392.  CONTROL "", CM_FILENEW, "CoolButton", CBTN_NOFOCUS | WS_CHILD |
  393.    WS_VISIBLE, 6, 1, 16, 18
  394.  CONTROL "", CM_FILEOPEN, "CoolButton", CBTN_NOFOCUS | WS_CHILD |
  395.    WS_VISIBLE, 22, 1, 16, 18
  396.  CONTROL "", CM_HELPINDEX, "CoolButton", CBTN_NOFOCUS | WS_CHILD |
  397.    WS_VISIBLE, 43, 1, 16, 18
  398. }
  399.  
  400. /* Menu bar when document is open */
  401. EMENUBAR DIALOG 17, 106, 385, 20
  402. STYLE WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS
  403. CLASS "RibbonClass"
  404. FONT 8, "MS Sans Serif"
  405. {
  406.  CONTROL "", CM_FILENEW, "CoolButton", CBTN_NOFOCUS | WS_CHILD |
  407.    WS_VISIBLE, 6, 1, 16, 18
  408.  CONTROL "", CM_FILEOPEN, "CoolButton", CBTN_NOFOCUS | WS_CHILD |
  409.    WS_VISIBLE, 22, 1, 16, 18
  410.  CONTROL "", CM_FILESAVE, "CoolButton", CBTN_NOFOCUS | WS_CHILD |
  411.    WS_VISIBLE, 38, 1, 16, 18
  412.  CONTROL "", CM_EDITCUT, "CoolButton", CBTN_NOFOCUS | WS_CHILD |
  413.    WS_VISIBLE, 104, 1, 16, 18
  414.  CONTROL "", CM_EDITCOPY, "CoolButton", CBTN_NOFOCUS | WS_CHILD |
  415.    WS_VISIBLE, 120, 1, 16, 18
  416.  CONTROL "", CM_EDITPASTE, "CoolButton", CBTN_NOFOCUS | WS_CHILD |
  417.    WS_VISIBLE, 136, 1, 16, 18
  418.  CONTROL "", CM_EDITUNDO, "CoolButton", CBTN_NOFOCUS | WS_CHILD |
  419.    WS_VISIBLE, 82, 1, 16, 18
  420.  CONTROL "", CM_SEARCHFIND, "CoolButton", CBTN_NOFOCUS | WS_CHILD |
  421.    WS_VISIBLE, 157, 1, 16, 18
  422.  CONTROL "", CM_SEARCHREPL, "CoolButton", CBTN_NOFOCUS | WS_CHILD |
  423.    WS_VISIBLE, 173, 1, 16, 18
  424.  CONTROL "", CM_HELPINDEX, "CoolButton", CBTN_NOFOCUS | WS_CHILD |
  425.    WS_VISIBLE, 194, 1, 16, 18
  426.  CONTROL "", CM_FILEPRINT, "CoolButton", CBTN_NOFOCUS | WS_CHILD |
  427.    WS_VISIBLE, 60, 1, 16, 18
  428. }
  429.  
  430. $|
  431. $I020000000 030000000
  432. MENUBAR DIALOG 17, 106, 22, 158
  433. STYLE WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS |WS_BORDER
  434. CLASS "RibbonClass"
  435. FONT 8, "MS Sans Serif"
  436. {
  437.  CONTROL "", CM_FILENEW, "CoolButton", CBTN_NOFOCUS | WS_CHILD | WS_VISIBLE, 2, 1, 16, 18
  438.  CONTROL "", CM_FILEOPEN, "CoolButton", CBTN_NOFOCUS | WS_CHILD | WS_VISIBLE, 2, 18, 16, 18
  439.  CONTROL "", CM_HELPINDEX, "CoolButton", CBTN_NOFOCUS | WS_CHILD | WS_VISIBLE, 2, 40, 16, 18
  440. }
  441.  
  442. EMENUBAR DIALOG 51, 65, 22, 224
  443. STYLE WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_BORDER
  444. CLASS "RibbonClass"
  445. FONT 8, "MS Sans Serif"
  446. {
  447.  CONTROL "", CM_FILENEW, "CoolButton", CBTN_NOFOCUS | WS_CHILD | WS_VISIBLE, 2, 3, 16, 18
  448.  CONTROL "", CM_FILEOPEN, "CoolButton", CBTN_NOFOCUS | WS_CHILD | WS_VISIBLE, 2, 20, 16, 18
  449.  CONTROL "", CM_FILESAVE, "CoolButton", CBTN_NOFOCUS | WS_CHILD | WS_VISIBLE, 2, 37, 16, 18
  450.  CONTROL "", CM_EDITCUT, "CoolButton", CBTN_NOFOCUS | WS_CHILD | WS_VISIBLE, 2, 102, 16, 18
  451.  CONTROL "", CM_EDITCOPY, "CoolButton", CBTN_NOFOCUS | WS_CHILD | WS_VISIBLE, 2, 119, 16, 18
  452.  CONTROL "", CM_EDITPASTE, "CoolButton", CBTN_NOFOCUS | WS_CHILD | WS_VISIBLE, 2, 135, 16, 18
  453.  CONTROL "", CM_EDITUNDO, "CoolButton", CBTN_NOFOCUS | WS_CHILD | WS_VISIBLE, 2, 80, 16, 18
  454.  CONTROL "", CM_SEARCHFIND, "CoolButton", CBTN_NOFOCUS | WS_CHILD | WS_VISIBLE, 2, 159, 16, 18
  455.  CONTROL "", CM_SEARCHREPL, "CoolButton", CBTN_NOFOCUS | WS_CHILD | WS_VISIBLE, 2, 176, 16, 18
  456.  CONTROL "", CM_HELPINDEX, "CoolButton", CBTN_NOFOCUS | WS_CHILD | WS_VISIBLE, 2, 198, 16, 18
  457.  CONTROL "", CM_FILEPRINT, "CoolButton", CBTN_NOFOCUS | WS_CHILD | WS_VISIBLE, 2, 59, 16, 18
  458. }
  459.  
  460. $|
  461.  
  462. $I00000X000
  463. /* No document menu */
  464. MMENU MENU
  465. {
  466.  POPUP "&File"
  467.  {
  468.   MENUITEM "&New\tAlt+N", CM_FILENEW
  469.   MENUITEM "&Open...", CM_FILEOPEN
  470.   MENUITEM "E&xit\tAlt+X", CM_FILEEXIT
  471.  }
  472.  
  473.  POPUP "&Help"
  474.  {
  475.   MENUITEM "&Index\tF1", CM_HELPINDEX
  476.   MENUITEM "&Keyboard", CM_HELPKEYBOARD
  477.   MENUITEM "&Commands", CM_HELPCOMMANDS
  478.   MENUITEM "&Procedures", CM_HELPPROCEDURES
  479.   MENUITEM "&Using help", CM_HELPUSING_HELP
  480.   MENUITEM SEPARATOR
  481.   MENUITEM "&About...", CM_HELPABOUT
  482.  }
  483.  
  484. }
  485.  
  486. /* Accelerators for above menu */
  487. MMENU ACCELERATORS
  488. {
  489.  "x", CM_FILEEXIT, ALT, NOINVERT
  490.  VK_F1, CM_HELPINDEX, VIRTKEY, NOINVERT
  491.  "n", CM_FILENEW, ALT, NOINVERT
  492. }
  493.  
  494.  
  495. /* Document menu */
  496. EMENU MENU
  497. {
  498.  POPUP "&File"
  499.  {
  500.   MENUITEM "&New\tAtl+N", CM_FILENEW
  501.   MENUITEM "&Open...", CM_FILEOPEN
  502.   MENUITEM "&Save", CM_FILESAVE
  503.   MENUITEM "Save &as...", CM_FILESAVEAS
  504.   MENUITEM SEPARATOR
  505.   MENUITEM "&Print...", CM_FILEPRINT
  506.   MENUITEM "E&xit\tAlt+X", CM_FILEEXIT
  507.  }
  508.  
  509.  POPUP "&Edit"
  510.  {
  511.   MENUITEM "&Undo\tCtrl+Z", CM_EDITUNDO
  512.   MENUITEM "C&lear\tDel",  CM_EDITCLEAR
  513.   MENUITEM "&Cut\tCtrl+X", CM_EDITCUT
  514.   MENUITEM "&Copy\tCtrl+C", CM_EDITCOPY
  515.   MENUITEM "&Paste\tCtrl+V", CM_EDITPASTE
  516.   MENUITEM SEPARATOR
  517.   MENUITEM "Select &All\tCtrl+A", CM_EDITSELALL
  518.  }
  519.  
  520.  POPUP "&Search"
  521.  {
  522.   MENUITEM "&Find...", CM_SEARCHFIND
  523.   MENUITEM "&Replace...",CM_SEARCHREPL
  524.  }
  525.  
  526.  
  527. $I100000000
  528.  POPUP "&Window"
  529.  {
  530.   MENUITEM "&Cascade", CM_WINCASCADE
  531.   MENUITEM "&Tile", CM_WINTILE
  532.   MENUITEM "&Arrange", CM_WINARRANGE
  533.   MENUITEM SEPARATOR
  534.   MENUITEM "C&lose All", CM_WINCLOSEALL
  535.  }
  536. $|
  537.  
  538.  POPUP "&Help"
  539.  {
  540.   MENUITEM "&Index\tF1", CM_HELPINDEX
  541.   MENUITEM "&Keyboard", CM_HELPKEYBOARD
  542.   MENUITEM "&Commands", CM_HELPCOMMANDS
  543.   MENUITEM "&Procedures", CM_HELPPROCEDURES
  544.   MENUITEM "&Using help", CM_HELPUSING_HELP
  545.   MENUITEM SEPARATOR
  546.   MENUITEM "&About...", CM_HELPABOUT
  547.  }
  548.  
  549. }
  550.  
  551. /* Accelerators for document */
  552. EMENU ACCELERATORS
  553. {
  554.  "^Z", CM_EDITUNDO, ASCII, NOINVERT
  555.  "^X", CM_EDITCUT, ASCII, NOINVERT
  556.  "^C", CM_EDITCOPY, ASCII, NOINVERT
  557.  "^A", CM_EDITSELALL, ASCII, NOINVERT
  558.  VK_F1, CM_HELPINDEX, VIRTKEY, NOINVERT
  559.  "X", CM_FILEEXIT, VIRTKEY, NOINVERT, ALT
  560.  "N", CM_FILENEW, VIRTKEY, NOINVERT, ALT
  561.  VK_DELETE, CM_EDITCLEAR, VIRTKEY, NOINVERT
  562. }
  563. $E
  564. /*! You deselected the "Use standard menu" option. Place your menus here */
  565. $|
  566.  
  567.  
  568. APPICON ICON "main.ico"
  569.  
  570.  
  571. $I100000000
  572. DOCICON ICON "doc.ico"
  573. $|
  574.  
  575.  
  576. /* Override default help messages */
  577. STRINGTABLE
  578. {
  579.   CM_FILEEXIT, "End $F"
  580.   CM_HELPABOUT, "About $F"
  581. $I0000X0000
  582. /* Private help messages */
  583.   4000, "Open the named file"
  584.   4001, "Open the named file"
  585.   4002, "Open the named file"
  586.   4003, "Open the named file"
  587.   4004, "Open the named file"
  588.   4005, "Open the named file"
  589.   4006, "Open the named file"
  590.   4007, "Open the named file"
  591.   4008, "Open the named file"
  592.   4009, "Open the named file"
  593. $|
  594. }
  595.  
  596.  
  597. /* About box CoolDialog */
  598. ABTBOX DIALOG 47, 22, 122, 120
  599. STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
  600. CLASS "CoolDialog"
  601. CAPTION "About $F"
  602. FONT 12, "MS Sans Serif"
  603. {
  604.  CTEXT "$F is a CoolWorx Application", -1, 11, 6, 100, 82
  605.  CONTROL "&OK", IDOK, "CoolButton", CBTN_CAPTION | CBTN_DEF |
  606.    WS_CHILD | WS_VISIBLE | WS_TABSTOP, 53, 95, 15, 24
  607.  CONTROL "", -1, "static", SS_BLACKFRAME | WS_CHILD |
  608.    WS_VISIBLE, 7, 4, 108, 85
  609. }
  610.  
  611.  
  612.  
  613. $|
  614. $I300000000
  615. $! Commando Main file
  616. $F$F.C
  617. /******************************************************************
  618.     $F - Commando-style CoolWorx program created by CoolGen
  619.     Date: $D
  620.  ******************************************************************/
  621.  
  622. #include <windows.h>
  623. #include <cw.h>
  624. #include "$F.h"
  625.  
  626. char ini[]="$F.INI";
  627.  
  628. /* Main entry point */
  629. int PASCAL WinMain(HANDLE hInst, HANDLE prev,
  630.             LPSTR cmdline, int show)
  631.   {
  632. /* If you want an icon, use
  633.   cw_BeginIcons(hInst,NULL,NULL,LoadIcon(hInst,APPICON));
  634.   instead of the next line */
  635.  
  636.   cw_Begin(hInst);        // start CoolWorx
  637. /* Show dialog box -- No callback! */
  638. /*! You may want to add a real dialog template
  639.     in place of the cw_NullCDlgTemp() call here */
  640.   cw_DialogBox(hInst,MAKEINTRESOURCE(MAIN_DLG),NULL,NULL,cw_NullCDlgTemp());
  641. /* End CoolWorx */
  642.   cw_End(hInst);
  643.   return FALSE;
  644.   }
  645.  
  646. /* To learn more about writing dialog only programs and other Windows
  647.    programming shortcuts -- check out Commando Windows Programming by
  648.    Al Williams (published by Addison Wesley). */
  649.  
  650. $F$F.H
  651. $! Command header
  652. /*! Place your defines and prototypes here */
  653. #define MAIN_DLG 100
  654. $|
  655. $FReadMe
  656. The $F application was created by CoolGen, the CoolWorx Application
  657. Generator.
  658.  
  659. $I100000000
  660. Style: MDI
  661. $|
  662. $I200000000
  663. Style: SDI
  664. $|
  665. $I300000000
  666. Style: Commando
  667. $|
  668.  
  669. Files:
  670. ReadMe - This file
  671. $$F.C - Main application file
  672. $$F.H - Header file
  673. $$F.RC - Resources
  674. $$F.DEF - Linker DEF file
  675. Makefile - Make file for Microsoft C
  676.  
  677. To compile this program, simply enter NMAKE. The default options
  678. will create the program using small model and with debugging
  679. turned on. You can modify these options by editing Makefile.
  680.  
  681. Before compiling, make sure that your compiler and linker are
  682. set to search for the CoolWorx headers and libraries
  683. (CW.H, CWHIST.H, CBUTTON.H, and COOLWORX.LIB).
  684.  
  685.  
  686. $!Common def file
  687. $F$F.DEF
  688. NAME           $F
  689. Description    'Generated by CoolGen'
  690. EXETYPE        WINDOWS
  691. CODE           PRELOAD MOVABLE DISCARDABLE
  692. DATA           PRELOAD MOVABLE
  693. HEAPSIZE       1024
  694. STACKSIZE      21000
  695.  
  696. $I300000000
  697. $F$F.RC
  698. #include <windows.h>
  699. #include <cbutton.h>
  700. #include <cwhist.h>
  701. #include <cwmenu.h>
  702. #include "$F.h"
  703.  
  704. MAIN_DLG DIALOG 58, 32, 293, 221
  705. STYLE DS_MODALFRAME | DS_NOIDLEMSG | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX
  706. CLASS "CoolDialog"
  707. CAPTION "$F"
  708. FONT 8, "MS Sans Serif"
  709. {
  710.  CONTROL "OK", IDOK, "CoolButton", CBTN_NOAUTOSIZE | CBTN_CAPTION | CBTN_DEF | WS_CHILD | WS_VISIBLE, 84, 177, 27, 35
  711.  CONTROL "Cancel", IDCANCEL, "CoolButton", CBTN_NOAUTOSIZE | CBTN_CAPTION | WS_CHILD | WS_VISIBLE, 131, 177, 33, 37
  712.  CONTROL "Help", CM_HELPINDEX, "CoolButton", CBTN_NOAUTOSIZE | CBTN_CAPTION | WS_CHILD | WS_VISIBLE, 183, 177, 24, 40
  713. }
  714.  
  715. $|
  716.  
  717. $FMakefile
  718. # Microsoft makefile for $F (use NMAKE)
  719. # Generated by CoolGen
  720. CFLAGS=-Zi -GA
  721.  
  722. $$F.EXE : $F.OBJ $F.RES $F.DEF
  723.        cl $$(CFLAGS) $F.OBJ COOLWORX.LIB $F.DEF
  724.        rc $F.RES $F.EXE
  725.  
  726. $$F.RES : $F.RC $F.H
  727.         rc -r $F.RC $F.RES
  728.  
  729. $$F.OBJ : $F.C $F.H
  730.         cl -c $$(CFLAGS) $F.C
  731.  
  732.